<cfset objCass = CreateObject("component", "components.cassandra")>
<cfset cassClient = objCass.connect("127.0.0.1", 9160)>
<cfset testKSName = "TestKeyspace">

<h3>Testing Keyspace:</h3>
<cfset exists = cassClient.hasKeyspace(testKSName)>


<!--- if the key space doesn't already exist, then we try to add it --->
<cfif NOT exists>
	<p>The Key space doesn't exist, we will try adding it:
	<cfset added = cassClient.addKeyspace(testKSName)>
	<cfoutput>#added#</cfoutput></p>
<cfelse>
	<p>The key space already exists.</p>
</cfif>


<!--- now the keyspace should exist, we delete it --->
<p>Removing Keyspace:</p>
<cfset removed = cassClient.removeKeyspace(testKSName)>
<cfoutput>#removed#</cfoutput>
<cfif removed IS NOT "">
	<p>The keyspace has now been deleted</p>
<cfelse>
	<p>Couldn't delete the keyspace</p>
</cfif>
